//import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import { RouteRecordRaw } from 'vue-router'
//import HomeView from "../views/HomeView.vue";

const routes: Array<RouteRecordRaw> = [
	{
		path: '/',
		name: 'index',
		redirect: '/login', //设置默认指向的路径
		children: [
			{
				path: '/invest',
				name: 'invest',
				meta: { title: '投资项目经济评价原型系统v1.0' },
				component: () => import('../views/HomeView.vue'),
				redirect: '/general',
				children: [
					{
						path: '/infrastructure',
						name: 'infrastructure',
						meta: { title: '基建项目投资经济评价' },
						redirect: '/infrastructure',
						children: [
							{
								path: '/infrastructure',
								name: 'infrastructure_project',
								component: () =>
									import(
										'../views/InfrastructureProjectEvaluation/ProjectView.vue'
									),
								meta: { title: '项目视图' },
							},
							{
								path: '/infrastructure/solution',
								name: 'infrastructure_solution',
								component: () =>
									import(
										'../views/InfrastructureProjectEvaluation/SolutionView.vue'
									),
								meta: { title: '方案视图' },
							},
							{
								path: '/infrastructure/compare',
								name: 'infrastructure_compare',
								component: () =>
									import(
										'../views/InfrastructureProjectEvaluation/SolutionCompare.vue'
									),
								meta: { title: '方案比选' },
							},
							{
								path: '/infrastructure/report',
								name: 'infrastructure_report',
								component: () =>
									import(
										'../views/InfrastructureProjectEvaluation/SolutionReport.vue'
									),
								meta: { title: '方案报告' },
							},
							{
								path: '/infrastructure/solution/indicator',
								name: 'infrastructure_solution_indicator',
								component: () =>
									import(
										'../views/InfrastructureProjectEvaluation/IndicatorEditView.vue'
									),
								meta: { title: '方案指标' },
							},
							{
								path: '/infrastructure/solution/eva',
								name: 'infrastructure_solution_evaluation',
								component: () =>
									import(
										'../views/InfrastructureProjectEvaluation/IndicatorResultView.vue'
									),
								meta: { title: '方案评价' },
							},
						],
					},
					{
						path: '/generic',
						name: 'generic',
						meta: { title: '一般项目投资经济评价' },
						redirect: '/generic',
						children: [
							{
								path: '/generic',
								name: 'generic_project',
								component: () => import('../views/Generic/ProjectView.vue'),
								meta: { title: '项目视图' },
							},
							{
								path: '/generic/solution',
								name: 'generic_solution',
								component: () => import('../views/Generic/SolutionView.vue'),
								meta: { title: '方案视图' },
							},
							{
								path: '/generic/compare',
								name: 'generic_compare',
								component: () => import('../views/Generic/SolutionCompare.vue'),
								meta: { title: '方案比选' },
							},
							{
								path: '/generic/report',
								name: 'generic_report',
								component: () => import('../views/Generic/SolutionReport.vue'),
								meta: { title: '方案报告' },
							},
							{
								path: '/generic/solution/indicator',
								name: 'generic_solution_indicator',
								component: () =>
									import('../views/Generic/IndicatorEditView.vue'),
								meta: { title: '方案指标' },
							},
							{
								path: '/generic/solution/eva',
								name: 'generic_solution_evaluation',
								component: () =>
									import('../views/Generic/IndicatorResultView.vue'),
								meta: { title: '方案评价' },
							},
						],
					},
					{
						path: '/equipment',
						name: 'equipment',
						meta: { title: '装备购置投资评价' },
						redirect: '/equipment',
						children: [
							{
								path: '/equipment',
								name: 'equipment-project',
								component: () =>
									import('../views/EquipmentPurchase/ProjectView.vue'),
								meta: { title: '项目视图' },
							},
							{
								path: '/equipment/solution',
								name: 'equipment_solution',
								component: () =>
									import('../views/EquipmentPurchase/SolutionView.vue'),
								meta: { title: '方案视图' },
							},
							{
								path: '/equipment/solution/indicator',
								name: 'equipment_solution_indicator',
								component: () =>
									import('../views/EquipmentPurchase/SolutionIndicator.vue'),
								meta: { title: '方案指标编辑' },
							},
							{
								path: '/equipment/solution/eva',
								name: 'equipment_solution_evaluation',
								component: () =>
									import('../views/EquipmentPurchase/SolutionEvaluation.vue'),
								meta: { title: '方案评价' },
							},
							{
								path: '/equipment/compare',
								name: 'equipment_solution_compare',
								component: () =>
									import('../views/EquipmentPurchase/SolutionCompare.vue'),
								meta: { title: '方案比选' },
							},
							{
								path: '/equipment/type',
								name: 'equipment_type',
								component: () =>
									import(
										'../views/EquipmentPurchase/TypeView.vue'
										),
								meta: { title: '装备类型管理' },
							},
							{
								path: '/equipment/price',
								name: 'equipment_repair_price',
								component: () =>
									import(
										'../views/EquipmentPurchase/PriceView.vue'
										),
								meta: { title: '维修价格管理' },
							},
						],
					},
					{
						path: '/user',
						name: 'user',
						// component: () => import("../views/User/UserManage.vue"),
						meta: { title: '用户管理' },
						redirect: '/user',
						children: [
							{
								path: '/user',
								name: 'user',
								component: () => import('../views/User/UserManage.vue'),
								meta: { title: '用户管理' },
							},
							{
								path: '/user/role',
								name: 'role',
								component: () => import('../views/User/RoleManage.vue'),
								meta: { title: '角色管理' },
							},
							{
								path: '/user/resource',
								name: 'resource',
								component: () => import('../views/User/ResourceManage.vue'),
								meta: { title: '资源管理' },
							},
						],
					},
					{
						path: '/basis',
						name: 'basis',
						meta: { title: '政策文件与基础数据' },
						redirect: '/basis',
						children: [
							{
								path: '/basis',
								name: 'basis',
								component: () => import('../views/basis/BasisView.vue'),
								meta: { title: '基础数据' },
							},
							{
								path: '/basis/upload',
								name: 'basisUpload',
								component: () => import('../views/basis/BasisUpload.vue'),
								meta: { title: '基础数据上传' },
							},
							{
								path: '/files/upload',
								name: 'filesUpload',
								component: () => import('../views/basis/FileUpload.vue'),
								meta: { title: '政策文件上传' },
							},
							{
								path: '/files',
								name: 'files',
								component: () => import('../views/basis/FilesView.vue'),
								meta: { title: '政策文件' },
							},
							{
								path: '/files/censor',
								name: 'filesCensor',
								component: () => import('../views/basis/FileCensor.vue'),
								meta: { title: '政策文件审核' },
							},
							{
								path: '/fileTag',
								name: 'fileTag',
								component: () => import('../views/basis/FileTagView.vue'),
								meta: { title: '政策文件标签' },
							},
						],
					},
					{
						path: '/repair',
						name: 'repair',
						meta: { title: '大修资本化投资经济评价' },
						redirect: '/repair',
						children: [
							{
								path: '/repair',
								name: 'repair-project',
								component: () => import('../views/Repair/ProjectView.vue'),
								meta: { title: '项目视图' },
							},
							{
								path: '/repair/solution',
								name: 'repair_solution',
								component: () => import('../views/Repair/SolutionView.vue'),
								meta: { title: '方案视图' },
							},
							{
								path: '/repair/solution/indicator',
								name: 'repair_solution_indicator',
								component: () =>
									import('../views/Repair/IndicatorEditView.vue'),
								meta: { title: '方案指标编辑' },
							},
							{
								path: '/repair/solution/eva',
								name: 'repair_solution_evaluation',
								component: () =>
									import('../views/Repair/IndicatorResultView.vue'),
								meta: { title: '方案评价' },
							},
						],
					},
					{
						path: '/repair/compare',
						name: 'repair_compare',
						component: () => import('../views/Repair/SolutionCompare.vue'),
						meta: { title: '方案比选' },
					},
					{
						path: '/repair/report',
						name: 'repair_report',
						component: () => import('../views/Repair/SolutionReport.vue'),
						meta: { title: '方案报告' },
					},
					{
						path: '/update',
						name: 'update',
						meta: { title: '更新改造项目投资经济评价' },
						redirect: '/update',
						children: [
							{
								path: '/update',
								name: 'update-project',
								component: () => import('../views/Update/ProjectView.vue'),
								meta: { title: '项目视图' },
							},
							{
								path: '/update/solution',
								name: 'update_solution',
								component: () => import('../views/Update/SolutionView.vue'),
								meta: { title: '方案视图' },
							},
							{
								path: '/update/solution/indicator',
								name: 'update_solution_indicator',
								component: () =>
									import('../views/Update/IndicatorEditView.vue'),
								meta: { title: '方案指标编辑' },
							},
							{
								path: '/update/solution/eva',
								name: 'update_solution_evaluation',
								component: () =>
									import('../views/Update/IndicatorResultView.vue'),
								meta: { title: '方案评价' },
							},
							{
								path: '/update/compare',
								name: 'update_compare',
								component: () => import('../views/Update/SolutionCompare.vue'),
								meta: { title: '方案比选' },
							},
							{
								path: '/help',
								name: 'help',
								component: () => import('../views/HelpView.vue'),
								meta: {title: '帮助页'}
							}
						],
					},
				],
			},
		],
	},
	{
		path: '/login',
		name: 'login',
		meta: { title: '用户登录' },
		component: () => import('../views/LoginView.vue'),
	},
	{
		path: '/blank',
		name: 'blank',
		meta: { title: '空白页' },
		component: () => import('../views/HomeView.vue'),
	},
]

export default routes
